/*
 * $Id: UdpAddress.cc,v 1.3 2005-07-23 09:22:42 bacon Exp $
 */

#include <xpp/net/UdpAddress.h>
#include <xpp/net/Socket.h>

namespace xpp
{
	namespace net
	{

		UdpAddress::UdpAddress (): InetAddress (V0, Socket::DATAGRAM)
		{
		}

		UdpAddress::UdpAddress (int family): InetAddress (family, Socket::DATAGRAM)
		{
		}

		UdpAddress::UdpAddress (const InetAddress& adr): InetAddress (adr)
		{
			address_type = Socket::DATAGRAM;
		}

		UdpAddress::UdpAddress (
			const struct sockaddr_in& adr): InetAddress (adr)
		{
			address_type = Socket::DATAGRAM;
		}

		UdpAddress::UdpAddress (
			const struct sockaddr_in6& adr): InetAddress (adr)
		{
			address_type = Socket::DATAGRAM;
		}

		UdpAddress& UdpAddress::operator= (const InetAddress& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::DATAGRAM;
			return *this;
		}

		UdpAddress& UdpAddress::operator= (
			const struct sockaddr_storage& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::DATAGRAM;
			return *this;
		}
		UdpAddress& UdpAddress::operator= (
			const struct sockaddr_in& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::DATAGRAM;
			return *this;
		}

		UdpAddress& UdpAddress::operator= (
			const struct sockaddr_in6& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::DATAGRAM;
			return *this;
		}

	}
}
